/* pages/inspection/inspection.wxss */
/**index.less**/
page {
    height: 100vh;
    overflow-y: auto; /* 确保页面可以滚动 */
}

.index-page {
    position: relative;
    width: 100%;
    min-height: 100vh; /* 改为最小高度，允许内容超出 */
    background: linear-gradient(179.96deg, #FFFFFF 7.67%, #FFECEB 58.76%);
}

.navigation-bar {
    position: relative;
    width: 94%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;

    .iconfont {
        font-size: 24px;
    }

    .logo {
        width: 245rpx;
        height: 70rpx;
    }
}

.main-content {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 132rpx); /* 改为最小高度，允许内容超出 */
}

/* 首字母圆形按钮样式 */
.initial-button {
    width: 36px;
    height: 36px;
    border: 0.72px solid rgba(172, 172, 172, 1);
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 13px;
    font-family: Noto Sans SC;
    font-weight: 500;
    font-size: 16px;
    color: rgba(255, 255, 255, 1);
    border: 0.72px solid rgba(172, 172, 172, 1);
    overflow: hidden; /* 确保头像不会溢出圆形边界 */
}

/* 用户头像样式 */
.user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover; /* 确保头像填充整个容器 */
}

/* 新增搜索框样式 */
.search-container {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30rpx 0;
    width: 94%;
    margin: auto;
}

.search-box {
    display: flex;
    align-items: center;
    //width: 242px; /* 固定搜索框宽度 */
    height: 72rpx;
    padding: 0 20rpx;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 1000px;
    border: 0.75px solid #B9B9B9;
}

.search-icon-wrap {
    margin-left: 12rpx;
    padding: 12rpx 18rpx; /* 扩大点击区域 */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1000px;
}

.search-icon-hover {
    background: rgba(0, 0, 0, 0.06); /* 按压反馈 */
}

.search-icon {
    font-family: "iconfont" !important;
    font-size: 16px;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #999;
    margin-right: 0;
}

.search-icon::before {
    content: "\e60a";
}

.search-input {
    flex: 1;
    /* 输入框自适应宽度 */
    font-size: 28rpx;
    color: #787878;
}

.placeholder-style {
    font-family: Noto Sans SC;
    font-weight: 400;
    font-style: Regular;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
}

/* 发布按钮样式 */
.publish-button {
    /* 文字样式 */
    color: rgba(120, 120, 120, 1);
    /* 灰色文字 */
    font-family: Noto Sans SC;
    font-weight: 400;
    font-style: Regular;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: 0%;
    white-space: nowrap;
    /* 按钮边框 */
    border: 0.75px solid #B9B9B9;
    background-color: transparent;
    max-width: 57.75px;
    /* 固定宽度 */
    height: 72rpx;
    border-radius: 16.5px;
    /* 圆角 */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.content-feed {
    position: relative;
    width: 100%;
    height: calc(100% - 132rpx);
    /* 移除overflow-y: auto，让页面自然滚动，确保触底事件能正常触发 */
    /* overflow-y: auto; */
}

/* 瀑布流容器 */
.waterfall-container {
    display: flex;
    padding: 16px;
    gap: 8px;
    /* 列间距 */
}

/* 瀑布流容器 */
.waterfall-container {
    display: flex;
    padding: 16px;
    gap: 8px;
    /* 列间距 */
}

/* 内容列 */
.waterfall-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* 卡片间距 */
}

/* 内容卡片 - 修改为自适应 */
.content-card {
    width: 100%;
    /* 由父容器控制宽度 */
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    /* 垂直布局 */
    min-height: 0;
    /* 防止内容溢出 */
}

.card-image {
    width: 100%;
    height: auto;
    /* 高度自适应 */
    display: block;
}

.card-info {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex: 1;
    /* 占满剩余空间 */
    min-height: 0;
    /* 防止内容溢出 */
}

.card-title {
    font-size: 14px;
    color: #333;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* 限制2行 */
    overflow: hidden;
    margin-bottom: 8px;
    word-break: break-word;
    /* 允许换行 */
}

.card-footer {
    display: flex;
    align-items: center;
    margin-top: auto;
    /* 使footer始终在底部 */
}

.avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
    flex-shrink: 0;
    /* 防止头像被压缩 */
}

.username {
    flex: 1;
    font-size: 12px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    /* 允许文本截断 */
}

.likes {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #999;
    flex-shrink: 0;
    /* 防止点赞区域被压缩 */
    margin-left: 4px;
}

.likes .iconfont {
    font-size: 14px;
    margin-right: 2px;
    color: #787878;

}

/* 收藏提示框样式 */
.toast-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.toast-content {
    border: 1px solid #0A4CE9;
    background-color: white;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* 垂直居中 */
    width: 120px; /* 调整宽度 */
    height: 80px; /* 调整高度 */
    padding: 16px; /* 调整内边距 */
    box-sizing: border-box;
    text-align: center; /* 确保内容居中 */
}

.toast-icon {
    font-size: 24px; /* 图标大小24px */
    color: #0A4CE9; /* 图标颜色#0A4CE9 */
    margin-bottom: 8px; /* 图标和文字之间的间距 */
    display: block; /* 确保图标独占一行 */
    line-height: 1; /* 调整行高 */
}

.toast-text {
    font-weight: 400;
    font-size: 14px; /* 文字大小 */
    color: #0A4CE9;
    text-align: center; /* 文字居中 */
    line-height: 1; /* 调整行高 */
    margin: 0; /* 移除默认边距 */
}

/* 加载状态样式 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200rpx;
    width: 100%;
}

.loading-text {
    font-family: Noto Sans SC;
    font-weight: 400;
    font-size: 28rpx;
    color: #666;
}

/* 收藏图标样式 */
.likes .icon-shoucang {
    color: #FF744E;
    font-size: 32rpx;
}

.likes .icon-shoucang:active {
    transform: scale(0.9);
}

/* 个人中心侧边栏样式 */
.pcenter-sider {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* 加载更多相关样式 */
.load-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20rpx 0;
    width: 100%;
}

.load-more-text {
    font-family: Noto Sans SC;
    font-weight: 400;
    font-size: 28rpx;
    color: #666;
}

.no-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20rpx 0;
    width: 100%;
}

.no-more-text {
    font-family: Noto Sans SC;
    font-weight: 400;
    font-size: 28rpx;
    color: #999;
}

/* 搜索模式提示样式 */
.search-mode-tip {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20rpx;
    margin-top: 20rpx;
    background: rgba(0, 122, 255, 0.1);
    border-radius: 8rpx;
    margin: 20rpx 16px 0;
}

.search-tip-text {
    font-size: 28rpx;
    color: #007aff;
    font-weight: 500;
}

/* 标签管理弹窗样式 */
.tag-modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.tag-modal {
    width: 80%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.modal-content {
    padding: 20px;
}

.input-group {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.tag-input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.modal-actions {
    display: flex;
    padding: 20px;
    gap: 12px;
    border-top: 1px solid #f0f0f0;
}

.cancel-btn, .confirm-btn {
    flex: 1;
    height: 44px;
    border-radius: 8px;
    font-size: 16px;
    border: none;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
}

.confirm-btn {
    background: #0A4CE9;
    color: white;
}

/* 标签Action Sheet样式 */
.tag-action-sheet-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 1000;
}

.tag-action-sheet {
    width: 100%;
    max-height: 70vh;
    background: white;
    border-radius: 16px 16px 0 0;
    padding: 0;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.action-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.action-sheet-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.header-right .iconfont {
    font-size: 20px;
    color: #999;
}

.action-sheet-content {
    padding: 20px;
    max-height: 40vh;
    overflow-y: auto;
}

.tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12rpx;
    width: 100%;
    justify-content: space-between;
}

.grid-tag-item {
    /* 三列铺满一行 */
    flex: 0 0 calc(33.333% - 8rpx);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rpx 6rpx;
    background: transparent;
    border: 1px solid #787878;
    border-radius: 24rpx;
    font-size: 20rpx;
    color: #787878;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-align: center;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 36px;
}

.grid-tag-item.selected {
    border: 1px solid #0A4CE9 !important;
    background: #0A4CE9 !important;
    color: white !important;
    font-weight: 600;
    box-shadow: 0 2rpx 8rpx rgba(10, 76, 233, 0.3);
    transform: scale(1.05);
}

/* 确保选中状态样式优先级 */
.grid-tag-item.selected {
    background-color: #0A4CE9 !important;
    color: #ffffff !important;
    border-color: #0A4CE9 !important;
}

/* 调试用 - 强制选中状态 */
.grid-tag-item[class*="selected"] {
    background: #0A4CE9 !important;
    color: white !important;
    border: 2px solid #0A4CE9 !important;
    font-weight: bold !important;
}

/* 最高优先级调试样式 */
view.grid-tag-item.selected {
    background-color: #0A4CE9 !important;
    color: #ffffff !important;
    border: 2px solid #0A4CE9 !important;
    font-weight: bold !important;
    opacity: 1 !important;
}

.grid-tag-item:active {
    transform: scale(0.95);
}

/* 确保active状态不覆盖selected状态 */
.grid-tag-item.selected:active {
    background: #0A4CE9 !important;
    color: white !important;
    border: 2px solid #0A4CE9 !important;
    transform: scale(0.95);
}

.grid-tag-item.add-tag {
    border-color: #0A4CE9;
    color: #0A4CE9;
    border-style: dashed;
}

.plus-icon {
    font-size: 16px;
    margin-right: 4px;
}

.add-text {
    font-size: 14px;
}

.action-sheet-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
}

.action-sheet-footer .confirm-btn {
    width: 100%;
    height: 44px;
    background: #0A4CE9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
}